package com.aliyun.messagemgt.repository.mappers;


import com.aliyun.messagemgt.dto.SmsQuotaMonitor;
import com.aliyun.messagemgt.entities.SmsQuotaMonitorEntity;

/**
 * 短信配额监控mapper
 *
 * @author byp
 * @date 2020/7/13
 */
public interface SmsQuotaMonitorMapper {

    /**
     * 插入监控记录
     *
     * @param smsQuotaMonitor 短信配额监控信息
     */
    void insert(SmsQuotaMonitor smsQuotaMonitor);

    /**
     * 更新短信配额监控记录
     *
     * @param smsQuotaMonitor 短信配额监控信息
     */
    void update(SmsQuotaMonitor smsQuotaMonitor);

    /**
     * 删除
     * @param msgSourceId 消息源uuid
     */
    void delete(String msgSourceId);

    /**
     * 根据消息源id和状态查询短信配额监控信息
     *
     * @param msgSourceId 消息源UUID
     * @param status      状态
     * @return 监控信息
     */
    SmsQuotaMonitorEntity selectMonitorByMsgSourceIdAndStatus(String msgSourceId, Integer status);
}
